package 寒假刷题;

public class 寻找比目标字母大的最小字母 {

    public char nextGreatestLetter(char[] letters, char target) {
        for (char letter : letters) {
            if (letter>target)
                return letter;
        }
        return letters[0];
    }
}
